import http from "../util/http.js";

const baseURL = import.meta.env.VITE_APP_BASE_URL;
export const getMediaType = () => {
    return http.get(baseURL + "media/type");
};

export const getTvMedia = (keyword) => {
    return http.get(`${baseURL}media/search?keyword=${keyword}`);
};

export const getTvMediaDetail = (id, mediaType) => {
    return http.get(`${baseURL}media/detail?id=${id}&mediaType=${mediaType}`);
};

export const getPublishHelperInfo = (data) => {
    return http.post(`${baseURL}media/publishHelperInfo`, data);
}

export const confirmPublishInfo = (data) => {
    return http.post(`${baseURL}media/confirmPublishInfo`, data);
}

export const autoFeedUrl = (id) => {
    return http.post(`${baseURL}media/autoFeedUrl/${id}`);
}

export const getSource = () => {
    return http.get(baseURL + "media/source");
}

export const getTeam = () => {
    return http.get(baseURL + "media/team");
}